package com.tangtang.core.basic;

import javax.annotation.Nullable;

public interface Action<T> {
    /**
     * @param input
     * @return
     */
    @Nullable
    void apply(@Nullable T input);

    /**
     * Indicates whether another object is equal to this function.
     * <p/>
     * <p/>
     * Most implementations will have no reason to override the behavior of
     * {@link Object#equals}. However, an implementation may also choose to
     * return {@code true} whenever {@code object} is a {@link Function} that it
     * considers <i>interchangeable</i> with this one. "Interchangeable"
     * <i>typically</i> means that
     * {@code Objects.equal(this.apply(f), that.apply(f))} is true for all
     * {@code f} of type {@code F}. Note that a {@code false} result from this
     * method does not imply that the functions are known <i>not</i> to be
     * interchangeable.
     */
    @Override
    boolean equals(@Nullable Object object);
}
